<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<script type="text/javascript">
$(document).ready(function() { 
        seePasswordFields(); 
    } 
);

function seePasswordFields() {
	$('#User_password')[0].disabled = $('#User_ignorePassword')[0].checked;
	$('#User_passwordConfirmation')[0].disabled = $('#User_ignorePassword')[0].checked;
}
</script>
<div>
<s:form action="/users/User.action" method="POST">
	<s:hidden name="mode" value="S"></s:hidden>
	<table> 
		<tr>
			<td colspan="2"><s:text name="user.edit.title" /></td>
		</tr>
		<tr>
			<td><s:textfield key="user.edit.userId" name="userId" readonly="true"></s:textfield></td>
		</tr>
		<tr>
			<td><s:textfield key="user.edit.userName" name="username"></s:textfield></td>
		</tr>
		<tr>
			<td><s:checkbox key="user.edit.password.change" 
					onchange="seePasswordFields();"
					name="ignorePassword"></s:checkbox></td>
		</tr>
		<tr>
			<td><s:password key="user.edit.password" name="password"></s:password></td>
		</tr>
		<tr>
			<td><s:password key="user.edit.passwordConfirmation" name="passwordConfirmation"></s:password></td>
		</tr>
		<tr>
			<td><s:textfield key="user.edit.email" name="email"></s:textfield></td>
		</tr>
		<tr>
			<td><s:checkbox key="user.edit.admin" name="admin"></s:checkbox></td>
		</tr>
		<tr>	
			<td colspan="2">
				<s:submit cssClass="action" key="user.edit.save"/>
			</td>
		</tr>
	</table>
</s:form>
</div>